package com.inspur.demo.common;

public class CommonResultBuilder {

    public static void build(CommResultMsg commResultMsg, boolean result) {
        build(commResultMsg, result, commResultMsg.getDescription());
    }

    public static void build(CommResultMsg commResultMsg, boolean result, String desc) {
        build(commResultMsg, result, desc, commResultMsg.getObj());
    }

    public static void build(CommResultMsg commResultMsg, boolean result, String desc, Object object) {
        build(commResultMsg, result, desc, object, commResultMsg.getErrorCode());
    }

    public static void build(CommResultMsg commResultMsg, boolean result, String desc, Object object, String errorCode) {
        commResultMsg.setResult(result);
        commResultMsg.setDescription(desc);
        commResultMsg.setObj(object);
        commResultMsg.setErrorCode(errorCode);
    }
}

